package com.acsior.hibernate.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernateVO;

/**
 * CdReceiptsCanceled entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "cdReceiptsCanceled")
@GeneratorKey(tableName = "cdReceiptsCanceled")
public class CdReceiptsCanceledVO extends HibernateVO {
	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = -789998445951479861L;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "cashDeskID", nullable = false)
	private CdCashDeskVO cdCashDesk;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "receiptHeaderID", nullable = false)
	private CdReceiptHeaderVO cdReceiptHeader;

	@Column(name = "note", nullable = false)
	private String note;

	@Column(name = "proccessedByIG", nullable = false)
	private boolean proccessedByIg;

	@Id
	@Column(name = "receiptCanceledID", unique = true, nullable = false)
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Integer receiptCanceledId;

	@Column(name = "systemTime", nullable = false, length = 23)
	private Date systemTime;

	// Constructors

	/** default constructor */
	public CdReceiptsCanceledVO() {
		// и те така
	}

	
	/**
	 * @return стойността на cdCashDesk
	 */
	public CdCashDeskVO getCdCashDesk() {
		return this.cdCashDesk;
	}

	
	/**
	 * @param cdCashDesk се залага в cdCashDesk
	 */
	public void setCdCashDesk(CdCashDeskVO cdCashDesk) {
		this.cdCashDesk = cdCashDesk;
	}

	
	/**
	 * @return стойността на cdReceiptHeader
	 */
	public CdReceiptHeaderVO getCdReceiptHeader() {
		return this.cdReceiptHeader;
	}

	
	/**
	 * @param cdReceiptHeader се залага в cdReceiptHeader
	 */
	public void setCdReceiptHeader(CdReceiptHeaderVO cdReceiptHeader) {
		this.cdReceiptHeader = cdReceiptHeader;
	}

	
	/**
	 * @return стойността на note
	 */
	public String getNote() {
		return this.note;
	}

	
	/**
	 * @param note се залага в note
	 */
	public void setNote(String note) {
		this.note = note;
	}

	
	/**
	 * @return стойността на proccessedByIg
	 */
	public boolean isProccessedByIg() {
		return this.proccessedByIg;
	}

	
	/**
	 * @param proccessedByIg се залага в proccessedByIg
	 */
	public void setProccessedByIg(boolean proccessedByIg) {
		this.proccessedByIg = proccessedByIg;
	}

	
	/**
	 * @return стойността на receiptCanceledId
	 */
	public Integer getReceiptCanceledId() {
		return this.receiptCanceledId;
	}

	
	/**
	 * @param receiptCanceledId се залага в receiptCanceledId
	 */
	public void setReceiptCanceledId(Integer receiptCanceledId) {
		this.receiptCanceledId = receiptCanceledId;
	}

	
	/**
	 * @return стойността на systemTime
	 */
	public Date getSystemTime() {
		return this.systemTime;
	}

	
	/**
	 * @param systemTime се залага в systemTime
	 */
	public void setSystemTime(Date systemTime) {
		this.systemTime = systemTime;
	}

	/**
	 * @see com.acsior.dac.data.Data#getId()
	 */
	@Override
	public Object getId() {
		return getReceiptCanceledId();
	}

	/**
	 * @see com.acsior.dac.impl.hibernate.vo.HibernateVO#setId(java.lang.Object)
	 */
	@Override
	public void setId(Object id) {
		// тук дори не би трябвало да влизаме
		setReceiptCanceledId(Integer.class.cast(id));
	}

}